home *** CD-ROM | disk | FTP | other *** search
/ Champak 140 / (Vol 140) Sep 19 2011.iso / Games / world-wars.swf / scripts / __Packages / classes / ww_interface / Waiter.as < prev   
Encoding:
Text File  |  2011-09-19  |  728 b   |  35 lines

  1. class classes.ww_interface.Waiter extends MovieClip
  2. {
  3.    var status;
  4.    var onEnterFrame;
  5.    var countdown = 2;
  6.    var cdw = 0;
  7.    function Waiter()
  8.    {
  9.       super();
  10.       this._visible = false;
  11.       this.status = "ready_off";
  12.    }
  13.    function show()
  14.    {
  15.       this.status = "progress";
  16.       this._visible = true;
  17.       this.cdw = 0;
  18.       this.onEnterFrame = mx.utils.Delegate.create(this,this.makeBig);
  19.    }
  20.    function hide()
  21.    {
  22.       this._visible = false;
  23.       this.status = "ready_off";
  24.    }
  25.    function makeBig()
  26.    {
  27.       this.cdw = this.cdw + 1;
  28.       if(this.cdw > this.countdown)
  29.       {
  30.          this.status = "ready_on";
  31.          delete this.onEnterFrame;
  32.       }
  33.    }
  34. }
  35.